<template>
  <view class="login-page">
    <!-- 页面标题 -->
    <view class="page-title">账户登录</view>
    
    <!-- 登录选项容器 -->
    <view class="login-options">
      <!-- 员工登录入口 -->
      <view class="login-option" @click="handleLogin('employee')">
        <view class="item-icon">
              <text class="iconfont icon-shenghuofuwu"></text>
        </view>
        <view class="item-text">员工登录</view>
      </view>
      
      <!-- 企业登录入口 -->
      <view class="login-option" @click="handleLogin('company')">
        <view class="item-icon">
          <text class="iconfont icon-shenghuofuwu"></text>
        </view>
        <view class="item-text">企业登录</view>
      </view>
    </view>
    
    <!-- 底部说明 -->
    <view class="page-footer">
      <text>请选择对应的账户类型登录</text>
    </view>
  </view>
</template>

<script setup>
import { useRouter } from 'uni-mini-router';

const router = useRouter();

// 处理登录入口点击事件
const handleLogin = (type) => {
  // 根据登录类型跳转到对应的登录页面
  if (type === 'employee') {
    // router.push('/pages/login/employee');
	router.push({ name: 'account_login' })
  } else {
    router.push({name:"qiye_list"});
  }
};
</script>

<style lang="less" scoped>
.login-page {
  min-height: 100vh;
  background-color: #f5f7fa;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding-top: 160rpx;
  box-sizing: border-box;
}

// 页面标题
.page-title {
  font-size: 40rpx;
  font-weight: bold;
  color: #333333;
  margin-bottom: 120rpx;
}

// 登录选项容器
.login-options {
  width: 100%;
  display: flex;
  justify-content: space-around;
  padding: 0 60rpx;
  box-sizing: border-box;
}

// 单个登录选项
.login-option {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 200rpx;
  height: 200rpx;
  background-color: #ffffff;
  border-radius: 16rpx;
  box-shadow: 0 4rpx 10rpx rgba(0, 0, 0, 0.05);
  padding: 30rpx;
  box-sizing: border-box;
  cursor: pointer;
  transition: transform 0.2s ease;

  &:active {
    transform: scale(0.98);
  }
}

// 图标样式
.item-icon {
  width: 80rpx;
  height: 80rpx;
  background-color: #4caf50;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  font-size: 40rpx;
  margin-bottom: 20rpx;
}

// 文字样式
.item-text {
  font-size: 30rpx;
  color: #333333;
  font-weight: 500;
}

// 底部说明
.page-footer {
  margin-top: 180rpx;
  font-size: 24rpx;
  color: #999999;
}
</style>